<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="js/vue-2.6.12.js"></script>
</head>
<body>

<div id="app">

  <h1 v-if="show"> show= true </h1>

  <h1 v-else>show = false</h1>

  <button type="button" @click="changeClick" >切换</button>

</div>

<script>

  let app = new Vue({

    el:"#app",
    data:{

      show:true,


    },
    methods:{

      changeClick(){

        this.show = !this.show;

      },

    },

  });


</script>

</body>
</html>